import Vue from 'vue'
import Vuex from 'vuex'
import permission from './modules/permission'
import app from './modules/app'
import settings from './modules/settings'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    permission,
    app,
    settings
  },
  getters: {
    roles: state => state.permission.roles,
    permission_routes: state => state.permission.routes,
    sidebar: state => state.app.sidebar,
    device: state => state.app.device,
    showSettings: state => state.settings.showSettings,
    needTagsView: state => state.settings.tagsView,
    fixedHeader: state => state.settings.fixedHeader
  }
}) 